1. Field of the Invention
The present invention relates to an embroidery data processor for preparing embroidery sewing data used by a sewing machine to sew a predetermined embroidery pattern in a workpiece cloth.
2. Description of the Related Art
Some home-use sewing machines are able to sew embroidery patterns in a workpiece cloth based on prestored embroidery data. However, consumer desire for more versatile and fancy sewing machines and also improvements in performance of embroidery sewing machines have lead to the development of comparatively inexpensive and easy to use embroidery processors that are capable of sewing embroidery patterns designed by a user in addition to prestored embroidery patterns.
There are known embroidery data processors capable of automatically preparing embroidery data having a plurality of different colors. This saves a great amount of time and effort compared to manual preparation of stitch data. In one such embroidery data processor, a user draws an original picture on which a color embroidery pattern is to be based. The user then draws each different colored region of the picture separately on separate sheets. The different sheets are then scanned one at a time to input all different colored regions of the picture.
However, with this method, each picture of each separate sheet may be shifted slightly out of position. Even if a user carefully traces an original pattern to obtain a sheet with one outline fairly faithful to that of the original picture, drawn lines will normally have a non-uniform width. The variation in width is sufficient to produce positional shifts in the traced outline from the original pattern. Such positional deviations between individual sheets, accompanied by retrieval deviation for each scanning process, can result in different colored regions undesirably overlapping each other or the bordering outlines. Preparing embroidery data with few such positional shifts in colored regions is a time-consuming and tedious process that requires an operator with unexpected skill to perform.
U.S. Pat. No. 5,499,589 describes another type of embroidery data processor wherein a user draws an original picture first as an outline on a single sheet of paper and scans the sheet to input data for the outlines. Then, the user fills in a particular portion with a particular color and scans the sheet again. The user fills in different colored regions and scans the same sheet each time until all different colored regions have been colored in and scanned. The user need not fill in the colored regions completely, but only to a certain amount to enable the processor to recognize the indicated region.
The embroidery data processor described in U.S. Pat. No. 5,499,589 can produce embroidery data for sewing embroidery from a single sheet drawn with the desired picture in outline form. Therefore, there is no need to draw a separate sheet for each different colored portion of the desired picture. Further, since the same drawing on a single sheet is used to indicate all different colored regions, gaps will not appear between outlines and bounded regions as a result of positional deviation between sheets.
However, for the following reasons, when the bounded regions are to be sewn in a tatami stitch, but outlines are to be sewn in a narrow satin stitch or a running stitch, there is a great potential that gaps will appear between outlines and bounded regions of the resultant embroidery. Tatami stitch is used to fill in regions. The thread of a tatami stitch is aligned in parallel rows side by side and extends in one direction. Satin stitch and running stitch are for sewing lines. In a satin stitch, the threads zigzag back and forth across a central line. In a running stitch, the treads follow the line.
As mentioned above, embroidery data can be automatically produced by scanning image data of an original pattern or picture using an image scanner and then automatically converting the image data into embroidery data. In one method, contour lines of the original pattern are extracted from the image data. However, at the pixel level contour lines retrieved by a scanner will appear as regions many pixels across. The outer edges of the outline regions are defined by two borderlines, one on either side of the outline region they border. For example, a circular outline will appear at the pixel level as a thick ring defined from two borderlines, one at the outer periphery of the circle and one at the inner edge of the circle.
When an outline of an original pattern is to be sewn in a tatami stitch, first the outline is retrieved and borderlines of the outline are determined using well-known border following algorithms. Once the outline region bounded by the borderlines is extracted, sewing data for filling in the outline region in tatami stitch can be prepared. Since tatami stitch is used for filling in regions, such thick outlines can be sewn without gaps appearing between outlines and bounded regions of the embroidery pattern when both the outline and bounded region are sewn using tatami stitch.
However, it is impossible to prepare sewing data for sewing an outline in a running stitch or a satin stitch based on such a thick outline. Sewing data for sewing an outline in a running stitch or a satin stitch is prepared based on a thin-line outline formed from a continuous single path of pixels. Therefore, before the sewing data is prepared for sewing an outline in a running stitch or satin stitch, the image data having broad lines is subjected to well-known thinning processes to produce thin-line data including trains of pixels forming lines that are at maximum a single pixel in width. When sewing data for sewing outlines is prepared based on the thin lines, then data conversion can be freely performed to produce sewing data for running stitches and satin stitches.
To slim down a broad line several pixels in width in this way to form a thin line, pixels are shaved off from the outer edges until only a single pixel width remains. Because tatami stitch data for the bounded region is prepared from the broad line data, the tatami stitch data for the bounded region will not reflect this shift in the outer edge of the outline. Therefore, gaps will appear between the outlines sewn using a running stitch or a satin stitch of extremely narrow width and bounded regions sewn in a tatami stitch.
It is an objective of the present invention to overcome the above-described problems and to provide an embroidery data processor capable of quickly and easily preparing simply-structured embroidery sewing data for attractively sewing an inputted image without gaps forming between outlines and bounded regions, even when outlines are to be sewn in a satin stitch or a running stitch and bounded regions are to be sewn using tatami stitch and even when the operator of the embroidery data processor has no special knowledge or experience.
An embroidery data processor according to the present invention includes: a thinning unit that reduces thickness of lines in the image data to produce thin-line image data including at least one thin-line outline defining a bounded region corresponding to a region of the embroidery pattern; and a bounded region extractor that extracts the bounded region defined by the thin-line outline.
An embroidery data processor with this configuration can automatically prepare embroidery sewing data for both outline and bounded regions based on a single original drawing, even when the original drawing is formed from only contours and outlines. There is no need to repeatedly hand trace the original picture to produce separate pictures for each different colored region.
Because the outline and bounded regions are extracted from the same thin-line image, even when the outlines are sewn using satin stitches, running stitches, or other well-known stitch types used for sewing lines, embroidery stitch data can be prepared for sewing an outline and a bounded region, wherein the bounded region is to be sewn using a tatami stitch for example, without gaps forming between the outline and the bounded region.
According to another aspect of the present invention, an outline extractor is provided to extract outline data representing the at least one bounded region from the thin-line image data. A sewing data preparation unit can also be provided to prepare sewing data for sewing at least one of the outline extracted by the outline extractor or for filling in the at least one bounded region extracted by the bounded region extractor. With this configuration, data can be prepared for outlines, regions bounded by the outlines, or both. As a result, embroidery data can be prepared for a variety of different situations.
According to another aspect of the present invention, an embroidery data preparation unit is provided that prepares sewing data for both stitches for sewing the outline extracted by the outline extractor and also stitches for filling in the at least one bounded region extracted by the bounded region extractor. With this configuration, embroidery data can be prepared with little positional shift between outlines and regions bounded by the outlines.
A method according to the present invention includes the steps of: reducing thickness of lines in the image data to produce thin-line image data including at least one thin-line outline defining a bounded region corresponding to a region of the embroidery pattern; and extracting the bounded region defined by the thin-line outline.
A program storage medium according to the present invention stores: a program of reducing thickness of lines in the image data to produce thin-line image data including at least one thin-line outline defining a bounded region corresponding to a region of the embroidery pattern; and a program of extracting the bounded region defined by the thin-line outline.